import ajax from '@/utils/ajax'

export default {
    doRoles(params) {
        return ajax.get('/api-o/roles',params);
    },
    doRolesCheck(params) {
        return ajax.get('/api-o/roles/check',params);
    },
    doRolesAdd(data) {
        return ajax.post('/api-o/roles',data);
    },
    doRolesUpdate(data) {
        return ajax.put('/api-o/roles',data);
    },
    doRolesOfMenu(params) {
        return ajax.get(`/api-m/roles/${params.id}/menus`);
    },
    doRolesToMenu(data) {
        return ajax.post(`/api-m/roles/${data.id}/menus`,data.menuIds);
    },
}